package org.shijiagen.carousel.controller;

import lombok.RequiredArgsConstructor;
import org.shijiagen.carousel.service.CarouselService;
import org.shijiagen.utils.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("carousel")
@RequiredArgsConstructor
public class CarouselController {

    private final CarouselService carouselService;

    @PostMapping("list")
    public R list(){
        return R.ok(carouselService.list());
    }
}
